home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 2
/
Amiga Tools 2.iso
/
tools
/
mg
/
src.lzh
/
amiga
/
lmkfile
< prev
next >
Wrap
Text File
|
1990-05-23
|
4KB
|
108 lines
#
# lmkfile for mg3 and beyond, for use with Lattice v5.02 and beyond.
#
.SILENT
# Names of the directories where we find sources
MG = /mg
AMIGA = /amiga
#
# set things up so we get .o files built correctly
#
INCS = -i$(AMIGA) -i/h
LCFLAGS = -caufs -d0 -ma -qram: -rr -O $(INCS)
.c.o:
lc $(LCFLAGS) -o$@ $*
# list of amiga-specific source files
AMIGASRC1 = /amiga/ttymouse.c /amiga/ttymenu.c /amiga/menustack.c \
/amiga/iconify.c /amiga/ttyicon.c /amiga/spawn.c /amiga/offset.c
AMIGASRC2 =/amiga/ttyio.c /amiga/tty.c /amiga/ttykbd.c /amiga/fileio.c \
/amiga/console.c /amiga/dirio.c /amiga/rexx.c
# list of mg system-independent source files
MGSRC1 = /mg/macro.c /mg/regex.c /mg/re_search.c /mg/dired.c /mg/basic.c \
/mg/dir.c /mg/file.c /mg/line.c /mg/match.c /mg/paragraph.c \
/mg/random.c /mg/region.c /mg/search.c /mg/version.c /mg/window.c
MGSRC2 = /mg/word.c /mg/buffer.c /mg/display.c /mg/echo.c /mg/extend.c \
/mg/help.c /mg/kbd.c /mg/keymap.c /mg/main.c /mg/modes.c /mg/cinfo.c \
/mg/bind.c /mg/alloca.c
# list of amiga-specific object files
AMIGAOBJ = ttymouse.o ttymenu.o menustack.o iconify.o ttyicon.o spawn.o \
ttyio.o tty.o ttykbd.o fileio.o console.o dirio.o offset.o rexx.o
# list of mg objects
MGOBJ1 = macro.o regex.o re_search.o dired.o basic.o dir.o file.o line.o \
match.o paragraph.o random.o region.o search.o version.o window.o
MGOBJ2 = word.o buffer.o display.o echo.o extend.o help.o kbd.o keymap.o \
main.o modes.o bind.o cinfo.o alloca.o
OBJ = $(MGOBJ1) $(MGOBJ2) $(AMIGAOBJ)
#
# The editor
#
xmg: $(OBJ) tmp.lnk
blink with tmp.lnk
tmp.lnk:
echo "From lib:cres.o $(AMIGAOBJ) " noline > tmp.lnk1
echo "$(MGOBJ1) " noline > tmp.lnk2
echo "$(MGOBJ2) $(REXXOBJ) " noline > tmp.lnk3
echo "to xmg lib lib:lcr.lib lib:amiga.lib map nil:" > tmp.lnk4
echo "SMALLCODE SMALLDATA NODEBUG" > tmp.lnk5
echo "DEFINE @_main=@_tinymain" > tmp.lnk6
join tmp.lnk1 tmp.lnk2 tmp.lnk3 tmp.lnk4 tmp.lnk5 tmp.lnk6 as tmp.lnk
rm tmp.lnk?
clean:
-rm $(AMIGAOBJ)
-rm $(MGOBJ1)
-rm $(MGOBJ2)
-rm xmg tmp.lnk rexxobj.make
#
# build the dependency list for the .h files used by all sources. We do
# this in multiple passes so to avoid problems with the long command line
# generate when you slap all the sources together.
# Note that there are faster, but more environment-dependent, ways to do
# turn the output of the makemake's into an lmkfile. We avoid those
# on purpose.
#
depend: rexxobj.make
@echo "Making dependencies. The following include files will be missing:"
@echo "config.h lisp.h syntax.h"
@makemake >ram:mg-amg1 $(INCS) $(AMIGASRC1)
-@grep "Couldn't open" ram:mg-amg1
@makemake >ram:mg-amg2 $(INCS) $(AMIGASRC2)
-@grep "Couldn't open" ram:mg-amg2
@makemake >ram:mg-mg1 $(INCS) $(MGSRC1)
-@grep "Couldn't open" ram:mg-mg1
@makemake >ram:mg-mg2 $(INCS) $(MGSRC2)
-@grep "Couldn't open" ram:mg-mg2
-@grep >ram:mgx-amg1 -v "Couldn't open" ram:mg-amg1
-@grep >ram:mgx-amg2 -v "Couldn't open" ram:mg-amg2
-@grep >ram:mgx-mg1 -v "Couldn't open" ram:mg-mg1
-@grep >ram:mgx-mg2 -v "Couldn't open" ram:mg-mg2
@delete ram:mg-mg1 ram:mg-mg2 ram:mg-amg1 ram:mg-amg2
@join rexxobj.make /amiga/lmkfile \
ram:mgx-mg1 ram:mgx-mg2 ram:mgx-amg1 ram:mgx-amg2 \
as lmkfile
@delete ram:mgx-mg1 ram:mgx-mg2 ram:mgx-amg1 ram:mgx-amg2
# This turns the otherwise unused rexxobj.h into a define as to where the
# rexx object files live.
rexxobj.make: rexx.h
@echo "Creating rexxobj.make"
@echo >ram:editcoms "M1;E/\#define REXX/REXXOBJ =/; Q"
-@edit from rexx.h to rexxobj.make with ram:editcoms
@delete ram:editcoms
# file dependencies will be appended after this line by "make depend"